package com.wj1c.push.util;

public class StringUtil {
    public static boolean isNotEmpty(String str) {
        return !isEmpty(str);
    }
    public static boolean isEmpty(String str) {
        return str == null || str.length() == 0;
    }
    public static Integer stringToInteger(String str){
        Integer i = null;
        if(str!=null){
            i = Integer.valueOf(str);
        }
        return i;
    }
    public static int getInt(String str){//把字符串转换为int类型
        int i = 0;
        try{
            i = Integer.parseInt(str);
        }catch(NumberFormatException ex){}
        return i;
    }

}
